
import 'package:ysy_flutter_mvvm_yuanxuan/api/HttpService.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/base/BaseModel.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/base/PullPageBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/base/BaseBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/base/BaseListDataBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/detail/AddCartEntity.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/detail/GoodsDetailsBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/HomeAttentionPageBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/HomeCategoryTabBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/HomeAttentionBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/RecommendCategoryBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/home/RecommendGoodsBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/shopcart/ShopingCartBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/subitorder/SubitOrderBean.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/bean/subitorder/SubitOrderEntity.dart';
import 'package:ysy_flutter_mvvm_yuanxuan/helper/ViewHelper.dart';
import '../../../bean/home/HomeContentBean.dart';

class SubitOrderVM extends BaseModel{

  SubitOrderBean? subitOrderBean;
  String allMoney="0.0";
  MemberReceiveAddress? addressBean;

  //确认订单 数据
  void getSubitOrderInfo(List<SubitOrderEntity> list,{bool isDialog=true,RequestDone? requestDone}){
     onNetWorkVerdictAndData(future: subitOrder(list), result: (str){
         subitOrderBean=BaseDataBean<SubitOrderBean>.fromJson(str,(map) => SubitOrderBean.fromJson(map)).data;
         allMoney=subitOrderBean?.askPrice??"0.0";
         addressBean = subitOrderBean?.memberReceiveAddress;
     },isDialog:isDialog,done: requestDone);
  }

}